package com.hs.srm.admin.modules.harmfulsubstance.service;

import com.baomidou.mybatisplus.service.IService;
import com.hs.srm.admin.modules.harmfulsubstance.entity.ReportRepositoryEntity;
import com.hs.srm.admin.modules.vendor.vo.VendorCertificateVO;
import com.hs.srm.common.utils.PageUtils;
import com.hs.srm.common.utils.R;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import java.util.List;
import java.util.Map;

/**
 * 报告库接口
 *
 * @author ych
 * @since 2020-03-17 16:42:42
 */
public interface ReportRepositoryService extends IService<ReportRepositoryEntity> {
    PageUtils queryPage(Map<String, Object> params);

    List<ReportRepositoryEntity> selectBatchCodes(String[] codes, String vendorCode);

    R saveReport(ReportRepositoryEntity entity, HttpServletRequest request, String vendorCode, String vendorName) throws IOException, ServletException;

    int setExpiredValid(String now);

    int setWarningValid(String after);

    Map<String, Integer> getWarningCount(String vendorCode);

    ReportRepositoryEntity reportDataByCode(String vendorCode, String reportCode);

    // 通过供应商代码查询资质证书
    List<VendorCertificateVO> findFilePath(String vendorCode);
}